```html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Spring @RequestMapping 注解详解</title>
    <link href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            background-color: #f8fafc;
            color: #1e293b;
        }
        .hero-gradient {
            background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
        }
        .card-hover {
            transition: all 0.3s ease;
        }
        .card-hover:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        }
        .method-get { background-color: #4ade80; }
        .method-post { background-color: #60a5fa; }
        .method-put { background-color: #fbbf24; }
        .method-delete { background-color: #f87171; }
        .method-patch { background-color: #a78bfa; }
        .code-block {
            font-family: 'Courier New', Courier, monospace;
            background-color: #1e293b;
            color: #e2e8f0;
            border-radius: 0.5rem;
            overflow-x: auto;
        }
        .drop-cap::first-letter {
            float: left;
            font-size: 4.5rem;
            line-height: 0.9;
            margin-right: 1rem;
            margin-top: 0.5rem;
            color: #7c3aed;
            font-weight: 700;
        }
    </style>
</head>
<body class="min-h-screen">
    <!-- Hero Section -->
    <div class="hero-gradient text-white py-20 px-4 sm:px-6 lg:px-8">
        <div class="max-w-5xl mx-auto text-center">
            <div class="inline-flex items-center justify-center px-4 py-2 bg-white bg-opacity-20 rounded-full mb-6">
                <i class="fas fa-code mr-2"></i>
                <span class="text-sm font-medium">Spring Framework</span>
            </div>
            <h1 class="text-4xl md:text-5xl lg:text-6xl font-bold mb-6 font-serif">
                @RequestMapping 注解
            </h1>
            <p class="text-xl md:text-2xl max-w-3xl mx-auto opacity-90 leading-relaxed">
                Spring框架中用于映射请求URL到方法或控制器类的核心注解，构建RESTful API的基石
            </p>
        </div>
    </div>

    <!-- Main Content -->
    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-16">
        <!-- Introduction -->
        <section class="mb-20">
            <div class="prose prose-lg max-w-none prose-indigo">
                <p class="drop-cap leading-relaxed mb-8">
                    @RequestMapping是Spring框架中用于映射请求的URL到方法或控制器类的注解。它可以用于处理HTTP请求，指定请求的HTTP方法、路径等。在Spring MVC中，`@RequestMapping`通常用于标识控制器方法，用于处理用户请求并返回相应的响应。
                </p>
                
                <div class="bg-white rounded-xl shadow-lg p-6 mb-8 card-hover">
                    <h3 class="text-2xl font-bold text-gray-800 mb-4 flex items-center">
                        <i class="fas fa-info-circle text-purple-600 mr-2"></i>
                        基本概念
                    </h3>
                    <p class="text-gray-700">
                        `@RequestMapping`注解可以在类级别或方法级别使用，具体取决于你希望如何映射请求。类级别的注解提供初步的请求映射，而方法级别的注解进一步细化映射。
                    </p>
                </div>
            </div>
        </section>

        <!-- Parameters Section -->
        <section class="mb-20">
            <h2 class="text-3xl font-bold text-gray-900 mb-8 flex items-center font-serif">
                <i class="fas fa-cogs text-purple-600 mr-3"></i>
                参数详解
            </h2>
            
            <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
                <!-- Value Card -->
                <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
                    <div class="p-6">
                        <div class="flex items-center mb-3">
                            <div class="flex items-center justify-center w-10 h-10 rounded-full bg-purple-100 text-purple-600 mr-3">
                                <i class="fas fa-link"></i>
                            </div>
                            <h3 class="text-xl font-bold text-gray-800">value</h3>
                        </div>
                        <p class="text-gray-700">
                            用于指定映射的URL路径，可以是一个字符串数组，支持多个URL路径映射到同一个处理方法。
                        </p>
                    </div>
                </div>
                
                <!-- Method Card -->
                <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
                    <div class="p-6">
                        <div class="flex items-center mb-3">
                            <div class="flex items-center justify-center w-10 h-10 rounded-full bg-blue-100 text-blue-600 mr-3">
                                <i class="fas fa-exchange-alt"></i>
                            </div>
                            <h3 class="text-xl font-bold text-gray-800">method</h3>
                        </div>
                        <p class="text-gray-700">
                            用于指定请求的HTTP方法，可以是一个RequestMethod数组。默认情况下，该参数为RequestMethod.GET，表示只映射GET请求。
                        </p>
                    </div>
                </div>
                
                <!-- Params Card -->
                <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
                    <div class="p-6">
                        <div class="flex items-center mb-3">
                            <div class="flex items-center justify-center w-10 h-10 rounded-full bg-green-100 text-green-600 mr-3">
                                <i class="fas fa-filter"></i>
                            </div>
                            <h3 class="text-xl font-bold text-gray-800">params</h3>
                        </div>
                        <p class="text-gray-700">
                            用于指定请求的参数条件，可以是一个字符串数组。可以指定请求必须包含的参数或参数值等条件。
                        </p>
                    </div>
                </div>
                
                <!-- Headers Card -->
                <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
                    <div class="p-6">
                        <div class="flex items-center mb-3">
                            <div class="flex items-center justify-center w-10 h-10 rounded-full bg-yellow-100 text-yellow-600 mr-3">
                                <i class="fas fa-heading"></i>
                            </div>
                            <h3 class="text-xl font-bold text-gray-800">headers</h3>
                        </div>
                        <p class="text-gray-700">
                            用于指定请求的Header条件，可以是一个字符串数组。可以指定请求必须包含的Header或Header值等条件。
                        </p>
                    </div>
                </div>
                
                <!-- Consumes Card -->
                <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
                    <div class="p-6">
                        <div class="flex items-center mb-3">
                            <div class="flex items-center justify-center w-10 h-10 rounded-full bg-red-100 text-red-600 mr-3">
                                <i class="fas fa-download"></i>
                            </div>
                            <h3 class="text-xl font-bold text-gray-800">consumes</h3>
                        </div>
                        <p class="text-gray-700">
                            用于指定请求的Content-Type条件，可以是一个字符串数组。指定处理方法能够接收的Content-Type类型。
                        </p>
                    </div>
                </div>
                
                <!-- Produces Card -->
                <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
                    <div class="p-6">
                        <div class="flex items-center mb-3">
                            <div class="flex items-center justify-center w-10 h-10 rounded-full bg-indigo-100 text-indigo-600 mr-3">
                                <i class="fas fa-upload"></i>
                            </div>
                            <h3 class="text-xl font-bold text-gray-800">produces</h3>
                        </div>
                        <p class="text-gray-700">
                            用于指定响应的Content-Type条件，可以是一个字符串数组。指定处理方法能够产生的Content-Type类型。
                        </p>
                    </div>
                </div>
            </div>
        </section>

        <!-- Examples Section -->
        <section class="mb-20">
            <h2 class="text-3xl font-bold text-gray-900 mb-8 flex items-center font-serif">
                <i class="fas fa-laptop-code text-purple-600 mr-3"></i>
                示例代码
            </h2>
            
            <div class="space-y-10">
                <!-- Example 1 -->
                <div class="bg-white rounded-xl shadow-lg overflow-hidden card-hover">
                    <div class="px-6 py-4 border-b border-gray-200 flex items-center">
                        <span class="method-get px-3 py-1 rounded-full text-sm font-semibold text-white mr-3">GET</span>
                        <h3 class="text-xl font-bold text-gray-800">映射GET请求到处理方法</h3>
                    </div>
                    <div class="p-6">
                        <div class="code-block p-4 rounded-lg mb-4">
                            <pre><code class="text-sm">@RestController
@RequestMapping("/hello")
public class HelloController {

    @RequestMapping(method = RequestMethod.GET)
    public String sayHello() {
        return "Hello, World!";
    }
}</code></pre>
                        </div>
                        <p class="text-gray-700">
                            这个简单的示例展示了如何映射GET请求到一个控制器方法。访问<code class="bg-gray-100 px-1 py-0.5 rounded">/hello</code>路径将返回"Hello, World!"字符串。
                        </p>
                    </div>
                </div>
                
                <!-- Example 2 -->
                <div class="bg-white rounded-xl shadow-lg overflow-hidden card-hover">
                    <div class="px-6 py-4 border-b border-gray-200 flex items-center">
                        <span class="method-post px-3 py-1 rounded-full text-sm font-semibold text-white mr-3">POST</span>
                        <h3 class="text-xl font-bold text-gray-800">映射指定参数的POST请求</h3>
                    </div>
                    <div class="p-6">
                        <div class="code-block p-4 rounded-lg mb-4">
                            <pre><code class="text-sm">@RestController
@RequestMapping("/greet")
public class GreetingController {

    @RequestMapping(method = RequestMethod.POST, params = "name")
    public String greet(@RequestParam("name") String name) {
        return "Hello, " + name + "!";
    }
}</code></pre>
                        </div>
                        <p class="text-gray-700">
                            这个示例演示了如何创建一个接受POST请求的处理方法，并且要求请求必须包含"name"参数。使用<code class="bg-gray-100 px-1 py-0.5 rounded">@RequestParam</code>注解可以获取请求参数。
                        </p>
                    </div>
                </div>
                
                <!-- Example 3 -->
                <div class="bg-white rounded-xl shadow-lg overflow-hidden card-hover">
                    <div class="px-6 py-4 border-b border-gray-200 flex items-center">
                        <span class="method-get px-3 py-1 rounded-full text-sm font-semibold text-white mr-3">GET</span>
                        <h3 class="text-xl font-bold text-gray-800">映射指定Header的GET请求</h3>
                    </div>
                    <div class="p-6">
                        <div class="code-block p-4 rounded-lg mb-4">
                            <pre><code class="text-sm">@RestController
@RequestMapping("/info")
public class InfoController {

    @RequestMapping(method = RequestMethod.GET, headers = "X-API-Key=myApiKey")
    public String getInfo() {
        return "This is sensitive information.";
    }
}</code></pre>
                        </div>
                        <p class="text-gray-700">
                            这个示例展示了如何创建一个需要特定Header的请求处理方法。只有在请求头中包含<code class="bg-gray-100 px-1 py-0.5 rounded">X-API-Key=myApiKey</code>时才会处理该请求。
                        </p>
                    </div>
                </div>
                
                <!-- Example 4 -->
                <div class="bg-white rounded-xl shadow-lg overflow-hidden card-hover">
                    <div class="px-6 py-4 border-b border-gray-200 flex items-center">
                        <span class="method-post px-3 py-1 rounded-full text-sm font-semibold text-white mr-3">POST</span>
                        <h3 class="text-xl font-bold text-gray-800">映射指定Content-Type的POST请求</h3>
                    </div>
                    <div class="p-6">
                        <div class="code-block p-4 rounded-lg mb-4">
                            <pre><code class="text-sm">@RestController
@RequestMapping("/data")
public class DataController {

    @RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
    public String processData(@RequestBody Data data) {
        // Process JSON data
        return "Data processed successfully.";
    }
}</code></pre>
                        </div>
                        <p class="text-gray-700">
                            这个示例指定了<code class="bg-gray-100 px-1 py-0.5 rounded">consumes</code>参数为<code class="bg-gray-100 px-1 py-0.5 rounded">MediaType.APPLICATION_JSON_VALUE</code>，表示该处理方法只接受Content-Type为JSON的POST请求，并且使用<code class="bg-gray-100 px-1 py-0.5 rounded">@RequestBody</code>注解将请求的主体部分绑定到<code class="bg-gray-100 px-1 py-0.5 rounded">Data</code>对象上。
                        </p>
                    </div>
                </div>
                
                <!-- Example 5 -->
                <div class="bg-white rounded-xl shadow-lg overflow-hidden card-hover">
                    <div class="px-6 py-4 border-b border-gray-200 flex items-center">
                        <span class="method-get px-3 py-1 rounded-full text-sm font-semibold text-white mr-3">GET</span>
                        <h3 class="text-xl font-bold text-gray-800">映射指定Content-Type的响应</h3>
                    </div>
                    <div class="p-6">
                        <div class="code-block p-4 rounded-lg mb-4">
                            <pre><code class="text-sm">@RestController
@RequestMapping("/user")
public class UserController {

    @RequestMapping(method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
    public User getUser() {
        User user = new User("John Doe", 30);
        return user;
    }
}</code></pre>
                        </div>
                        <p class="text-gray-700">
                            这个示例指定了<code class="bg-gray-100 px-1 py-0.5 rounded">produces</code>参数为<code class="bg-gray-100 px-1 py-0.5 rounded">MediaType.APPLICATION_JSON_VALUE</code>，表示该处理方法产生的响应的Content-Type为JSON格式。
                        </p>
                    </div>
                </div>
                
                <!-- Example 6 -->
                <div class="bg-white rounded-xl shadow-lg overflow-hidden card-hover">
                    <div class="px-6 py-4 border-b border-gray-200 flex items-center">
                        <span class="method-get px-3 py-1 rounded-full text-sm font-semibold text-white mr-3">GET</span>
                        <h3 class="text-xl font-bold text-gray-800">多个URL映射到同一个处理方法</h3>
                    </div>
                    <div class="p-6">
                        <div class="code-block p-4 rounded-lg mb-4">
                            <pre><code class="text-sm">@RestController
@RequestMapping({"/home", "/index", "/"})
public class HomeController {

    @RequestMapping(method = RequestMethod.GET)
    public String home() {
        return "Welcome to the home page!";
    }
}</code></pre>
                        </div>
                        <p class="text-gray-700">
                            这个示例使用字符串数组将多个URL路径映射到同一个处理方法，访问任意一个URL(<code class="bg-gray-100 px-1 py-0.5 rounded">/home</code>, <code class="bg-gray-100 px-1 py-0.5 rounded">/index</code>或<code class="bg-gray-100 px-1 py-0.5 rounded">/</code>)，都会返回相同的响应。
                        </p>
                    </div>
                </div>
            </div>
        </section>

        <!-- Summary Section -->
        <section class="bg-white rounded-xl shadow-lg p-8 mb-20 card-hover">
            <h2 class="text-3xl font-bold text-gray-900 mb-6 flex items-center font-serif">
                <i class="fas fa-lightbulb text-purple-600 mr-3"></i>
                总结
            </h2>
            <div class="prose prose-lg max-w-none text-gray-700">
                <p class="mb-4">
                    这些示例演示了<code class="bg-gray-100 px-1 py-0.5 rounded">@RequestMapping</code>注解的常见用法，通过不同的参数配置，你可以更灵活地映射请求和响应处理方法，实现各种不同的业务需求。
                </p>
                <p>
                    需要根据具体的应用场景和业务逻辑来选择合适的参数配置和使用方式。<code class="bg-gray-100 px-1 py-0.5 rounded">@RequestMapping</code>是Spring MVC中最核心的注解之一，掌握它的各种用法对于开发Web应用至关重要。
                </p>
            </div>
        </section>
    </div>

    <!-- Footer -->
    <footer class="bg-gray-900 text-gray-300 py-12 px-4 sm:px-6 lg:px-8">
        <div class="max-w-7xl mx-auto">
            <div class="flex flex-col items-center justify-center">
                <div class="text-2xl font-bold text-white mb-2">技术小馆</div>
                <a href="http://www.yuque.com/jtostring" class="text-purple-400 hover:text-purple-300 transition-colors duration-200">
                    <i class="fas fa-external-link-alt mr-1"></i>
                    http://www.yuque.com/jtostring
                </a>
            </div>
            <div class="mt-8 pt-8 border-t border-gray-800 text-center text-sm">
                &copy; 2023 技术小馆. 保留所有权利.
            </div>
        </div>
    </footer>

    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <script>
        mermaid.initialize({
            startOnLoad: true,
            theme: 'dark',
            flowchart: {
                useMaxWidth: true,
                htmlLabels: true,
                curve: 'basis'
            }
        });
    </script>
</body>
</html>
```